package org.force4spring;

import org.springframework.dao.InvalidDataAccessResourceUsageException;

import com.sforce.soap.partner.fault.ApiQueryFault;
import com.sforce.soap.partner.fault.ExceptionCode;

public abstract class ApiQueryException extends InvalidDataAccessResourceUsageException {
	private ExceptionCode exceptionCode;
	private int row;
	private int column;
	
	public ApiQueryException(ApiQueryFault cause) {
		super(cause.getExceptionMessage(), cause);
		exceptionCode = cause.getExceptionCode();
		row = cause.getRow();
		column = cause.getColumn();
	}
	
	public int getRow() {
		return row;
	}
	
	public int getColumn() {
		return column;
	}
	
	public ExceptionCode getExceptionCode() {
		return exceptionCode;
	}
}
